{% extends 'layout.html' %}
{% block css %}
    {{ form.media.css }}
{% endblock %}

{% block content %}
    <div class="luffy-container">
        <form class="form-horizontal" method="post" enctype="multipart/form-data" novalidate>
            {% csrf_token %}

            {% for field in form %}
                <div class="form-group">
                    <label class="col-sm-2 control-label">{{ field.label }}</label>
                    <div class="col-sm-8">
                        {{ field }}
                        <span style="color: red;">{{ field.errors.0 }}</span>
                    </div>
                </div>
            {% endfor %}

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-8">
                    <button type="submit" class="btn btn-primary btn-sm" name="_save"><i
                            class='fa fa-save' aria-hidden='true'></i> 保 存
                    </button>
                </div>
            </div>

        </form>
    </div>

{% endblock %}


{% block js %}
    {{ form.media.js }}
{% endblock %}